package com.turing.data.scripts.contract.transfer

import com.turing.data.vo.out.review.DependParamsVO
import com.turing.data.vo.out.review.TaskElementVO


class AssetSetupRequirement_30180_10_transfer {

    static List< TaskElementVO.DrawResultVO > doConvert(List< TaskElementVO.DrawResultVO > resultVOs, DependParamsVO dependParams){

        for( drawResultVO in resultVOs ) {
                def childTaskSn = drawResultVO.childTaskSn
                if(null == childTaskSn || childTaskSn == ""){
                    continue
                }
            String modelValue = drawResultVO.text
            Integer[] numbers = modelValue.findAll(/\d+/)*.toInteger()
            int investors = 0
            for (num in numbers) {
                investors = num
                break
            }
            if(investors != 0){
                drawResultVO.businessValue = investors
                drawResultVO.type = 1
            }else{
                drawResultVO.businessValue = ""
            }

        }

        return resultVOs
    }

}
